namespace Amazon.Checkout.Services
{
    using System.Collections.Generic;
    using Models;

    using Orchard;

    public interface ICheckoutByAmazonService : IDependency
    {
        IEnumerable<PromotionRecord> GetPromotions();

        PromotionRecord GetPromotion(int promotionId);

        PromotionRecord GetPromotionByCode(string code);

        PromotionRecord CreatePromotion(string code, string description, string promotionType, double? discountRate, double? fixedAmountDiscount);

        void DeletePromotion(int promotionId);

        void UpdatePromotion(int promotionId, string code, string description, string promotionType, double? discountRate, double? fixedAmountDiscount);

        IEnumerable<TaxTableRecord> GetTaxTables();

        TaxTableRecord GetTaxTable(int taxTableId);

        TaxTableRecord CreateTaxTable(string name, string taxes);

        void DeleteTaxTable(int taxTableId);

        void UpdateTaxTable(int taxTableId, string name, string taxes);

        IEnumerable<TaxRuleRecord> GetTaxRules();

        IEnumerable<TaxRuleRecord> GetTaxRules(int taxTableId);

        TaxRuleRecord GetTaxRule(int taxId);

        TaxRuleRecord CreateTaxRule(string regionType, string region, decimal rate, bool shippingTaxed);

        void DeleteTaxRule(int taxId);

        void UpdateTaxRule(int taxId, string regionType, string region, decimal rate, bool shippingTaxed);

        IEnumerable<ShippingRecord> GetShippings();

        ShippingRecord CreateShipping(
                                        string includedRegionsString,
                                        string excludedRegionsString,
                                        string shipmentRateType,
                                        decimal shipmentBasedShippingRate,
                                        decimal weightBasedShippingRate,
                                        decimal itemQuantityBasedShippingRate,
                                        bool poboxSupported,
                                        string displayableShippingLabel,
                                        int serviceLevel);

        void UpdateShipping(
                            int shippingId,
                            string includedRegionsString,
                            string excludedRegionsString,
                            string shipmentRateType,
                            decimal shipmentBasedShippingRate,
                            decimal weightBasedShippingRate,
                            decimal itemQuantityBasedShippingRate,
                            bool poboxSupported,
                            string displayableShippingLabel,
                            int serviceLevel);

        ShippingRecord GetShipping(int shippingId);

        void DeleteShipping(int shippingId);
    }
}